precision mediump float;
varying vec2 v_texCoord;
uniform vec2 v_pixelation;
uniform sampler2D s_texture;

void main()
{
	vec2 tex;
	
	tex.x = sign(v_texCoord.x*v_pixelation.x) * floor(abs(v_texCoord.x*v_pixelation.x) + 0.5);
	tex.x = tex.x / v_pixelation.x;
	
	tex.y = sign(v_texCoord.y*v_pixelation.y) * floor(abs(v_texCoord.y*v_pixelation.y) + 0.5);
	tex.y = tex.y / v_pixelation.y;

	gl_FragColor = texture2D(s_texture, tex);
}

